package cn.wolfcode.luowowo.controller;

import cn.wolfcode.luowowo.util.UploadUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import java.util.HashMap;
import java.util.Map;

/**
 * 图片上传
 */
@Controller
public class UploadController {


    /**
     * 新增编辑攻略明细图片上传
     * @param pic
     * @return
     * @throws Exception
     */
    @RequestMapping("/coverImageUpload")
    @ResponseBody
    public Object uploadImg(MultipartFile pic) throws Exception {
        String ali = UploadUtil.uploadAli(pic);
        System.out.println(ali);
        return ali;
    }








}
